#include "common.h"

int minCostClimbingStairs(vector<int>& cost)
{
	int n = cost.size();
	if (n <= 1) return 0;
	int dp[1001];
	for (int i = 2; i <= n; i++)
	{
		dp[i] = min(dp[i - 1] + cost[i - 1], dp[i - 2] + cost[i - 2]);
	}
	return dp[n];
}